from pathlib import Path

from src.decrypte_file import DecrypteFile


class MainModel:
    def __init__(self):
        self._decrypte_file = DecrypteFile()

    def decrypted(self, input_file_path: Path) -> Path:
        if input_file_path.suffix == '.vmd':
            return self._decrypte_file.decrypted_vmd(input_file_path)
        elif input_file_path.suffix == '.pmx':
            return self._decrypte_file.decrypted_pmx(input_file_path)
        else:
            raise ValueError('不支持的文件类型')
